package day03;

public class IfDemo {
    public static void main(String[] args) {
        //分支结构：if结构
        //1.满500打八折
        double price=600.0;
        if(price>=500){
            price=price*0.8;//price *=0.8;
        }
        System.out.println("最终金额为"+price);
        //满500打八折
        double price1=300.0;
        if (price1>500){
            price1 *=0.8;
        }
        System.out.println("最终结算金额为"+price1);
        //2.判断成绩是否合法，若合法则输出     0-100之间(&&)

        double score1=95;
        if(score1>=0 && score1<=100){
            System.out.println(score1+"是合法成绩");
        }
        double score2=550;
        if(score2 >=0 && score2<=100){
            System.out.println(score2+"是合法成绩");
        }
        double score3=-50;
        if(score3>=0 && score3<=100){
            System.out.println(score3+"是合法成绩");
        }
        double score4=88;
        if(score4>=0 && score4<=100){
            System.out.println(score4+"是合法成绩");
        }
        System.out.println("继续");

        //3.

    }
}
